package nowCoder;

import java.util.Scanner;

/**
 * @Auther: zzx
 * @Date: 2024.02.24/2/24
 */
public class HJ62 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNextInt()) {
            int n = sc.nextInt();
            int sum = 0;
            for (int i = 32; i > 0; i--) {
                if ((1 << i & n) > 0) {
                    sum++;
                }
            }
            System.out.println(sum);
        }
    }
}
